<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ page import="java.*,util.*,model.*,control.*" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>动态新闻修改处理</title>
</head>

<body> 
<%
	request.setCharacterEncoding("utf-8");	
	int id = Integer.parseInt(request.getParameter("id"));
	String dongxiaoxiName = ParamUtil.getString(request, "dongxiaoxiName",null);
	String dongxiaoxiTime= ParamUtil.getString(request, "dongxiaoxiTime",null);
	String dongxiaoxiNeirong= ParamUtil.getString(request, "dongxiaoxiNeirong",null);
	
	Dongxiaoxi dongxiaoxi = new Dongxiaoxi();
	DongxiaoxiControl dc = new DongxiaoxiControl();
	
	dongxiaoxi.setDongxiaoxiName(dongxiaoxiName);
	dongxiaoxi.setDongxiaoxiTime(dongxiaoxiTime);
	dongxiaoxi.setDongxiaoxiNeirong(dongxiaoxiNeirong);
	
	if(dc.updateDongxiaoxi(dongxiaoxi, id))
	{
	%>
		
	<script language="javascript">
     alert("修改成功");
     window.location.href="xiaoshelian_xiaoxiguanli_d.jsp";
    </script>
	
	<%
	} else { 
	%>
	
	<script language="javascript">
     alert("修改失败");
     window.location.href="xiaoshelian_xiaoxiguanli_d.jsp";
    </script>
	<%} %>
	
</body>
</html>